﻿Public Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Label1.Text = Convert.ToString(seguridad.usuarioid1)
        Label2.Text = "En proceso"
        seguridad.verificapermisos()
    End Sub

    Protected Sub ASPxButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ASPxButton1.Click

        Dim opcion As Integer
        opcion = MsgBox("¿Desea dar por concluida esta solicitud?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "Cerrar Solicitud")
        If opcion = vbYes Then
            Try
                Dim tabla As New DataSet1TableAdapters.solicitudesTableAdapter

                tabla.UpdateQueryESTADO("Cerrada", ASPxGridView1.GetRowValues(ASPxGridView1.FocusedRowIndex, ("solicitudid")))

            Catch ex As Exception
                MsgBox("Lo sentimos, no se puedo resolver su solicitud", MsgBoxStyle.Critical, "Error")
            End Try
        Else
            System.Web.HttpContext.Current.Response.Redirect("~/CerrarSoli.aspx")

        End If
    End Sub
End Class